﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace mytest2.webs
{
    public partial class WebForm4 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            String redirectUrl = Page.Request.QueryString["redirectUrl"];
            String result = parseUrl(redirectUrl, "cc=dd&ff=ee");
            Debug.WriteLine(result);
        }
        public String parseUrl(String url, String paramOther)
        {
            String urlTemp = url.Replace("#", "qazwsxedc");
            Uri urlObj = new Uri(urlTemp);

            String urlObjQuery = urlObj.Query;
            if (urlObjQuery == null || urlObjQuery == "")
            {
                return url + "?" + paramOther;
            }

            return url + "&" + paramOther;
        }
    }
}